# -*- encoding: utf-8 -*-
'''
@File    :   data_creek.py
@Time    :   2022/03/26 10:42:14
@Author  :   yueke 
@Version :   1.0
@Contact :   huangyanting@zsc.edu.cn
@Desc    :   None
'''


from data import SourceDataDemo


class CreekData(SourceDataDemo):

    def __init__(self):
        """
        按照 SourceDataDemo 的格式覆盖数据
        """
        super().__init__()

        self.title = '智慧河涌大屏展示'
        self.counter = {'name': '监控总数量（全市）', 'value': 168}
        self.counter2 = {'name': '实时落水预警（行人）', 'value': 0}

        self.echart1_data = {
            'title': '实时监控',
            'data': [
                {
                    "name": "pic1",
                    "value": "./pic1.jpg"
                }
            ]
        }

        self.echart2_data = {
            'title': '镇区河涌监控分布',
            'data': [
                {
                    "name": "东区街道",
                    "value": 23
                },
                {
                    "name": "石歧街道",
                    "value": 19
                },
                {
                    "name": "三角镇",
                    "value": 13
                },
                {
                    "name": "东凤镇",
                    "value": 6
                },
                {
                    "name": "民众镇",
                    "value": 14
                },
                {
                    "name": "小榄镇",
                    "value": 12
                },
                {
                    "name": "古镇",
                    "value": 6
                },
                {
                    "name": "五桂山",
                    "value": 4
                },
                {
                    "name": "南朗镇",
                    "value": 12
                }
            ]
        }
        self.echarts3_1_data = {
            'title': '突发事件',
            'data': [
                {"name": "人体", "value": 977084},
                {"name": "船只", "value": 106294},
                {"name": "桶装物体", "value": 258712},
            ]
        }
        self.echarts3_2_data = {
            'title': '预警信息',
            'data': [
                {"name": "氮超标", "value": 45},
                {"name": "氨超标", "value": 172467},
                {"name": "总磷超标", "value": 202444},
                {"name": "PH超标", "value": 57077},
                {"name": "溶解氧超标", "value": 104538},
            ]
        }
        self.echarts3_3_data = {
           'title': '污染事件',
            'data': [
                {"name": "污染A", "value": 977084},
                {"name": "污染B", "value": 106294},
                {"name": "污染C", "value": 258712},
            ]
        }
      
        self.echart4_data = {
            'title': '河涌指标均值',
            'data': [
                {"name": "含氮", "value": [16839,22356,38262,33763,27436,20337,12178,34248,31356,50089,16040,16927]},
                {"name": "总磷", "value": [13292,7770,17510,17584,14516,14485,9193,17220,10323,19205,15400,5051]},
            ],
            'xAxis': ['1月', '2月', '3月','4月', '5月', '6月','7月', '8月', '9月','10月', '11月', '12月'],
        }
        self.echart5_data = {
            'title': '居民反馈好评镇区',
            'data': [
               {
                    "name": "民众镇",
                    "value": 140
                },
                {
                    "name": "小榄镇",
                    "value": 120
                },
                {
                    "name": "古镇",
                    "value": 62
                },
                {
                    "name": "五桂山",
                    "value": 44
                },
                {
                    "name": "南朗镇",
                    "value": 120
                }
            ]
        }
        self.echart6_data = {
            'title': '物联网环境监测#白石涌',
            'data': [
                {"name": "氨氮：2.11", "value": 21, "value2":  100-21, "color": "02", "radius": ['49%', '60%']},
                {"name": "PH：7.01", "value": 7, "value2": 100-7, "color": "01", "radius": ['59%', '70%']},
                {"name": "水温：27.7", "value": 45, "value2":  100-45, "color": "03", "radius": ['39%', '50%']},
                # {"name": "总氮：0.03", "value": 81, "value2":  100-81, "color": "05", "radius": ['30%', '40%']},
            ]
        }
        
        self.map_1_data = {
            'symbolSize': 80000,
            'data': [

                {
                    "name": "珠海",
                    "value": 72002
                },
                
                {
                    "name": "深州",
                    "value": 2
                },
                {
                    "name": "巴中",
                    "value": 55348
                },
                {
                    "name": "常州",
                    "value": 295863
                },
                {
                    "name": "阿坝",
                    "value": 23804
                },
                {
                    "name": "巴音郭楞蒙古",
                    "value": 3117
                },
                {
                    "name": "滕州",
                    "value": 2
                }
            ]
        }

